package valid

import "github.com/astaxie/beego/validation"

func ValidProfile(userName string, nickName string, pass string) (err *validation.ValidationResult) {
	valid := validation.Validation{}

	if v := valid.Required(userName, "userName"); !v.Ok {
		return v
	} else if v := valid.Required(nickName, "nickName"); !v.Ok {
		return v
	} else if v := valid.Required(pass, "password"); !v.Ok {
		return v
	}
	return &validation.ValidationResult{Ok: true}
}
